
import Vue from 'vue'
import VueI18n from 'vue-i18n'
import App from './App'
import store from '@/store/index'
import router from '@/router/index'


import ElementUI from 'element-ui';
import 'element-ui/lib/theme-chalk/index.css';


Vue.use(ElementUI);


Vue.config.productionTip = false
Vue.use(VueI18n)
const i18n = new VueI18n({
  locale: localStorage.getItem('languageSet') || 'zh',   //从localStorage里获取用户中英文选择，没有则默认中文
  messages: {
    'zh': require('./assets/languages/zh'),
    'en': require('./assets/languages/en')
  }
})
import { state } from '@/api/api'
//如果·用假数据则引入mock
if (state === 'mock') {
  require('@/mock/head')
  require('@/mock/customer')
}

new Vue({
  store,
  router,
  i18n,
  render: h => h(App)
}).$mount('#app')
